import { AuthingGuard } from '@authing/react-ui-components'
// 引入 css 文件
import '@authing/react-ui-components/lib/index.min.css'

const Login = () => {
  const appId = '61af70d5204cec9a542d2af5'
  const onLogin = (userInfo) => {
    window.localStorage.token = userInfo.token
    window.localStorage.tokenExpiredAt = userInfo.tokenExpiredAt
    window.location.reload()
  }
  return <AuthingGuard appId={appId} onLogin={onLogin} />
}

export default Login
